package me.firstapp.module.weixin.product;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import me.firstapp.module.base.BaseEntity;

@Entity
@Table(name = "PRODUCT_CATEGORY")
public class ProductCategory extends BaseEntity {

	private static final long serialVersionUID = -2892371840400892504L;

	public static final int STATUS_OFF = 0;// 停用状态
	public static final int STATUS_ON = 1;// 启用状态

	// 种类名称
	@Column(name = "NAME", length = 30, nullable = false, unique = true)
	private String name;

	// 种类标签FRUIT:水果
	@Column(name = "TAG", length = 10, nullable = false, unique = true)
	private String tag;

	// 图片链接
	@Column(name = "IMAGE_URL", length = 500)
	private String imageUrl;

	// 种类描述
	@Column(name = "DESCRIPTION", length = 200, nullable = true)
	private String description;

	// 排序
	@Column(name = "SORT", nullable = false, columnDefinition = "TINYINT")
	private Integer sort;

	// 状态，0：停用，1：启用
	@Column(name = "STATUS", columnDefinition = "TINYINT", nullable = false)
	private Integer status;

	@Transient
	private String url;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

}
